(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

plus#2(0, x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Rewrite Strategy: INNERMOST

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
plus#2(S(x4), x2) →+ S(plus#2(x4, x2))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x4 / S(x4)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

S is empty.
Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
plus#2, fold#3

They will be analysed ascendingly in the following order:
plus#2 < fold#3

(8) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

The following defined symbols remain to be analysed:
plus#2, fold#3

They will be analysed ascendingly in the following order:
plus#2 < fold#3

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
plus#2(gen_0':S3_0(0), gen_0':S3_0(b)) →RΩ(1)
gen_0':S3_0(b)

Induction Step:
plus#2(gen_0':S3_0(+(n6_0, 1)), gen_0':S3_0(b)) →RΩ(1)
S(plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b))) →IH
S(gen_0':S3_0(+(b, c7_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

The following defined symbols remain to be analysed:
fold#3

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
fold#3(gen_Nil:Cons4_0(n575_0)) → gen_0':S3_0(0), rt ∈ Ω(1 + n5750)

Induction Base:
fold#3(gen_Nil:Cons4_0(0)) →RΩ(1)
0'

Induction Step:
fold#3(gen_Nil:Cons4_0(+(n575_0, 1))) →RΩ(1)
plus#2(0', fold#3(gen_Nil:Cons4_0(n575_0))) →IH
plus#2(0', gen_0':S3_0(0)) →LΩ(1)
gen_0':S3_0(+(0, 0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(13) Complex Obligation (BEST)

(14) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
fold#3(gen_Nil:Cons4_0(n575_0)) → gen_0':S3_0(0), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

No more defined symbols left to analyse.

(15) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(16) BOUNDS(n^1, INF)

(17) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
fold#3(gen_Nil:Cons4_0(n575_0)) → gen_0':S3_0(0), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

No more defined symbols left to analyse.

(18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(19) BOUNDS(n^1, INF)

(20) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

No more defined symbols left to analyse.

(21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(22) BOUNDS(n^1, INF)